package ex.com.jm.food.service.impl;

import java.util.List;

import ex.com.jm.food.dao.CompanyAttendantDao;
import ex.com.jm.food.entity.Attendant;
import ex.com.jm.food.entity.Streets;
import ex.com.jm.food.service.CompanyAttendantService;

/**
 * 企业下的配送员管理业务逻辑层实现
 * @author zhaojw
 *
 */
public class CompanyAttendantServiceImpl implements CompanyAttendantService {

	private CompanyAttendantDao companyAttendantDao;
	
	public CompanyAttendantDao getCompanyAttendantDao() {
		return companyAttendantDao;
	}

	public void setCompanyAttendantDao(CompanyAttendantDao companyAttendantDao) {
		this.companyAttendantDao = companyAttendantDao;
	}

	@Override
	public List<Attendant> getAttendants(int initPage, int pageRow,
			String comId, String attName, Integer status, String order,
			String sort) {
		// TODO Auto-generated method stub
		return this.getCompanyAttendantDao().getAttendants(initPage, pageRow, comId, attName, status, order, sort);
	}

	@Override
	public int attCount(String comId, String attName, Integer status) {
		// TODO Auto-generated method stub
		return this.getCompanyAttendantDao().attCount(comId, attName, status);
	}

	@Override
	public boolean updateStatus(Integer status, String attId) {
		// TODO Auto-generated method stub
		return this.getCompanyAttendantDao().updateStatus(status, attId);
	}

	@Override
	public Object saveAtten(Attendant attendant) {
		// TODO Auto-generated method stub
		return this.getCompanyAttendantDao().saveAtten(attendant);
	}

	@Override
	public void updateAtten(Attendant attendant) {
		// TODO Auto-generated method stub
        this.getCompanyAttendantDao().updateAtten(attendant);
	}

	@Override
	public void delAtten(String attId) {
		// TODO Auto-generated method stub
       this.getCompanyAttendantDao().delAtten(attId);
	}

	@Override
	public Attendant editAttendant(String attId) {
		// TODO Auto-generated method stub
		return this.getCompanyAttendantDao().editAttendant(attId);
	}

	@Override
	public List<Attendant> getAttens(String comId, String address) {
		// TODO Auto-generated method stub
		return this.getCompanyAttendantDao().getAttens(comId, address);
	}

	@Override
	public List<Streets> getStreets(String county) {
		// TODO Auto-generated method stub
		return this.getCompanyAttendantDao().getStreets(county);
	}

}
